Repository navigation
fix(mobile): open web links from read-only chats - #40963
StiensWout wants to merge 8 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…read-only-linked-chats-do-n
Link classification is already covered by markdownLinks.test.ts; the removed tests only mirrored callback wiring through heavy mocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The automated pipeline stopped on this pull request and will not merge it: the proof was not accepted:
It stays open for a person to finish or close. |
Read-only linked chats on mobile rendered web links in assistant replies and tool-sent messages without handling taps. Both message types now open HTTP(S) links through the system URL opener, and the iOS link menu offers Open link only for supported destinations.
Fixes #40962
Reproduction on main
Commit 7ddc81d639 (main). The link is styled as a link, but tapping it leaves the read-only chat on screen. The cause is at
apps/mobile/src/features/threads/LinkedThreadSheet.tsx:176. Followed the steps under Evidence in the app on Pixel_9_API_37 (Android 17.0): The assistant’s Example link appeared blue in the chat marked Read-only. Tapping it left the same chat on screen.Evidence
Environment: Pixel_9_API_37, Android 17.0, Android Emulator on Linux x64
Steps:
Proven: the bug shows on main at 7ddc81d639 and no longer shows on head c490b83f9d.
Tests
pnpm exec vp test run apps/mobile/src/features/threads/LinkedThreadSheet.test.tsxpassed on head.pnpm exec vp run check:changedpassed on head.Not in this change
Who did the work
apps/mobile/src/features/threads/LinkedThreadSheet.test.tsx:16: The test mocks about twenty modules (including a react override for useSyncExternalStore, react-native, navigation, the linkedThread state and SelectableMarkdownText) and renders to static markup. What it really checks is that onLinkPress is passed to the markdown renderer, which is the callback wiring the testing rules say to leave out. It will also break whenever LinkedThreadSheet gains an import. Its URL cases (protocol-relative, relative path, thread link, empty href) repeat what apps/mobile/src/lib/markdownLinks.test.ts already covers for resolveMarkdownLinkPresentation. A smaller version would mock only react-native Linking and the markdown renderer, keep one web link and one non-web link, and leave the scheme matrix to the resolver's tests.; should,apps/mobile/src/features/threads/LinkedThreadSheet.test.tsx:63: The replacement SelectableMarkdownText parses fixtures with its own regex and calls onLinkPress directly. The test can pass even when the actual markdown component fails to forward a native tap, and its exact list of parsed labels only exercises the test parser. Keep SelectableMarkdownText and EnrichedMarkdownText in the path and simulate the press at the native widget boundary, leaving destination parsing to the renderer that owns it.Made in T3 Code by GPT 6.2 Sol and Claude Opus 5.5